package com.hfzy.ihk.facade.linkcall.entity.knowledge.type;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hfzy.ihk.common.facade.BaseEntity;
import com.hfzy.ihk.facade.linkcall.enums.AffectType;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
import java.util.List;

/**
 * 行业类型
 * */
@Document(indexName = "#{elasticSearchConfig.indexName()}_industry_type",shards = 24,replicas = 2, type = "data")
public class IndustryType implements BaseEntity {
    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    private long version;

    @Field(type = FieldType.Keyword)
    private String name;//类型名称

    @Field(type = FieldType.Keyword)
    private String parentId;//父级id ，如果是'' 为顶级id

    @Field(type = FieldType.Keyword)
    private String businessTypeBaseId;// 所属的业务类型ID

    private long modUserId;

    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss" )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date modTime;

    private long createUserId;

    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss" )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String belongBranchRelation;//此分支关系记载的是链关系

    private AffectType affectType;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public Date getModTime() {
        return modTime;
    }

    public void setModTime(Date modTime) {
        this.modTime = modTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public long getModUserId() {
        return modUserId;
    }

    public void setModUserId(long modUserId) {
        this.modUserId = modUserId;
    }

    public long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(long createUserId) {
        this.createUserId = createUserId;
    }

    public String getBelongBranchRelation() {
        return belongBranchRelation;
    }

    public void setBelongBranchRelation(String belongBranchRelation) {
        this.belongBranchRelation = belongBranchRelation;
    }

    public AffectType getAffectType() {
        return affectType;
    }

    public void setAffectType(AffectType affectType) {
        this.affectType = affectType;
    }

    public String getBusinessTypeBaseId() {
        return businessTypeBaseId;
    }

    public void setBusinessTypeBaseId(String businessTypeBaseId) {
        this.businessTypeBaseId = businessTypeBaseId;
    }

    public long getVersion() {
        return version;
    }

    public void setVersion(long version) {
        this.version = version;
    }
}
